home *** CD-ROM | disk | FTP | other *** search
- /* macro definitions for compressed-table C/FTL programs generated by flex */
-
- #include "flexskelcom.h"
-
- /* reinitializes everything except the current start condition. The last
- * input character is set to a newline so an initial beginning-of-line
- * rule will match
- */
- #define YY_INIT \
- { \
- yyleng = yy_c_buf_p = yy_e_buf_p = 0; \
- yy_hold_char = yy_ch_buf[yy_c_buf_p] = '\n'; \
- yytext = &yy_ch_buf[yy_c_buf_p]; \
- yy_saw_eof = 0; \
- }
-
- /* returns the length of the matched text */
- #define YY_LENG (yy_c_buf_p - yy_b_buf_p + 1)
-
- /* pushes one character back onto the input buffer. The character is put in
- * a position such that it logically follows the last character matched by
- * some rule
- */
- #define YY_UNPUT(c) \
- { \
- YY_DO_BEFORE_SCAN; /* undo effects of setting up yytext */ \
- if ( yy_c_buf_p == 0 ) \
- YY_SHIFT_UP; \
- if ( yy_c_buf_p <= 0 ) \
- YY_FATAL_ERROR( "flex scanner push-back overflow" ); \
- if ( yy_c_buf_p >= yy_b_buf_p && yy_ch_buf[yy_c_buf_p] == '\n' ) \
- yy_ch_buf[yy_c_buf_p - 1] = '\n'; \
- yy_ch_buf[yy_c_buf_p--] = c; \
- YY_DO_BEFORE_ACTION; /* set up yytext again */ \
- }
- #define unput YY_UNPUT
-
- /* moves the input buffer up into the top of its region. Assumes
- * yy_c_buf_p is 0.
- */
- #define YY_SHIFT_UP \
- { \
- yy_buf_pos = YY_BUF_MAX; \
- YY_DO_THE_SHIFT; \
- yy_c_buf_p = YY_BUF_MAX - yy_e_buf_p; \
- yy_e_buf_p = YY_BUF_MAX; \
- }
-
- /* tight loop to do the actual copying of the input buffer to the top of
- * its region
- */
- #define YY_DO_THE_SHIFT \
- for( yy_iii = yy_e_buf_p; yy_iii >= yy_c_buf_p; --yy_iii ) \
- { \
- yy_ch_buf[yy_buf_pos] = yy_ch_buf[yy_iii]; \
- yy_st_buf[yy_buf_pos] = yy_st_buf[yy_iii]; \
- --yy_buf_pos; \
- }
-
- /* done before the next pattern has been matched action */
- #define YY_DO_BEFORE_SCAN \
- yytext[yyleng] = yy_hold_char;
-
- /* done after the current pattern has been matched and before the corresponding action */
- #define YY_DO_BEFORE_ACTION \
- yytext = &yy_ch_buf[yy_b_buf_p]; \
- yyleng = YY_LENG; \
- yy_hold_char = yytext[yyleng]; \
- yytext[yyleng] = '\0';
-
- /* find the next rule matched */
- #ifdef FLEX_REJECT_ENABLED
- #define REJECT \
- { \
- YY_DO_BEFORE_SCAN; /* undo effects of setting up yytext */ \
- ++yy_lp; \
- goto find_rule; \
- }
- #else
- #define REJECT YY_FATAL_ERROR( "REJECT used and scanner was not generated using -r" )
- #endif
-